package init

import (
	"ew-srv/basic/config"
	"fmt"
	"github.com/spf13/viper"
)

func initApp() {
	viper.SetConfigFile("../../dev.yaml")
	err := viper.ReadInConfig()
	if err != nil {
		panic(err)
	} else {
		fmt.Println("动态配置连接成功")
	}
	err = viper.Unmarshal(&config.Appconf)
	if err != nil {
		panic(err)
	} else {
		fmt.Println(config.Appconf)
	}
}
